package com.ezhuan.system.pojo;

import java.util.Date;

import com.ezhuan.common.pojo.BasePojo;

/**
 * 用户提现历史资料
 * 
 * @author wangshSxt
 *
 */
public class AAdver extends BasePojo<AAdver>
{
	private String name;
	private String imgPath;
	private String url;
	private String content;
	private byte atype ; 
	private byte status;
	private Date createTime;
	private Date updateTime;
	private Date pubTime;
	
	/* 字符串描述 */
	private String statusStr ; 
	private String atypeStr ; 

	@Override
	public String getTableName()
	{
		return "a_adver";
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getImgPath()
	{
		return imgPath;
	}

	public void setImgPath(String imgPath)
	{
		this.imgPath = imgPath;
	}

	public String getUrl()
	{
		return url;
	}

	public void setUrl(String url)
	{
		this.url = url;
	}

	public String getContent()
	{
		return content;
	}

	public void setContent(String content)
	{
		this.content = content;
	}

	public byte getStatus()
	{
		return status;
	}

	public void setStatus(byte status)
	{
		this.status = status;
	}

	public Date getCreateTime()
	{
		return createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	public Date getUpdateTime()
	{
		return updateTime;
	}

	public void setUpdateTime(Date updateTime)
	{
		this.updateTime = updateTime;
	}

	public Date getPubTime()
	{
		return pubTime;
	}

	public void setPubTime(Date pubTime)
	{
		this.pubTime = pubTime;
	}
	
	public String getStatusStr()
	{
		// 根据状态值获取字符串描述
		AAdverEnum[] adverEnums = AAdverEnum.values();
		for (int i = 0; i < adverEnums.length; i++)
		{
			AAdverEnum adverEnum = adverEnums[i];
			if (adverEnum.toString().startsWith("STATUS_"))
			{
				// 表示是状态的标识
				if (adverEnum.getStatus() == this.getStatus())
				{
					this.statusStr = adverEnum.getName();
					break;
				}
			}
		}
		return statusStr;
	}

	public byte getAtype()
	{
		return atype;
	}

	public void setAtype(byte atype)
	{
		this.atype = atype;
	}

	public String getAtypeStr()
	{

		// 根据状态值获取字符串描述
		AAdverEnum[] adverEnums = AAdverEnum.values();
		for (int i = 0; i < adverEnums.length; i++)
		{
			AAdverEnum adverEnum = adverEnums[i];
			if (adverEnum.toString().startsWith("ATYPE_"))
			{
				// 表示是状态的标识
				if (adverEnum.getStatus() == this.getAtype())
				{
					this.atypeStr = adverEnum.getName();
					break;
				}
			}
		}
		return atypeStr;
	}
}
